home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d27
/
mkdrv20.arc
/
CKDRV20.DOC
< prev
next >
Wrap
Text File
|
1990-11-02
|
15KB
|
368 lines
CKDRIVE.COM
Version 2.0
Memory-Resident Driver for Add-On Computer Clocks
IMPROVEMENTS IN THIS VERSION:
Version 2.0 of CKDRIVE eliminates limitations of
version 1.0 that required manual resetting for a
new year or a leap year. The program now (1)
advances the year automatically after midnight
December 31 and (2) advances the date to February
29 instead of March 1 in leap years. Other
changes improve synchronization between the add-on
clock and the system clock; they now agree within
about .01 sec.
AUTHOR: Pete Petrakis
COMPANY: Life Sciences Software
2020 Lake Heights Drive, R-301
Everett, Washington 98208
DISTRIBUTION: Distributed as shareware, which means
"try before you buy," not "free."
Payment of $5 is required if you find
after 21 days that CKDRIVE meets your
needs. Please send your payment (check
or money order) to the above address,
or call us at 206-337-7328 if you want
to register with a MasterCard or VISA.
DESCRIPTION:
CKDRIVE is a memory-resident program that allows
battery-powered add-on clocks to be set with the
TIME and DATE commands in DOS. It also
automatically updates the DOS clock/calendar an
instant before the time and date are displayed
whenever you use DOS's TIME or DATE command or are
running a program that reads the time and date.
CKDRIVE eliminates the need to run special
clocksetting programs such as SETCLOCK (to set the
add-on clock) and GETCLOCK (to refresh the DOS
clock/calendar from the add-on clock). Whenever
you want to change the time or date in your add-
1
on clock, just change the time or date in DOS, and
CKDRIVE will automatically pass the change along
to the add-on clock. Whenever you want to know
the time or date in DOS, just ask for it in DOS,
and CKDRIVE will refresh the DOS clock/calendar
from the add-on clock an instant before the time
or date is displayed on your screen.
It's important to understand what is meant here by
an add-on clock. Although the so-called slotless
clocks, which plug into a ROM chip socket in your
computer, are also add-on clocks, they are not the
kind that CKDRIVE can work with. Nor will it work
with the CMOS clock, which is a battery clock but
not an add-on, and is an integral part of the
original equipment in AT and better computers.
The add-on clock that CKDRIVE is designed to work
with is the type that comes on a circuit board
that plugs into an expansion slot in your
computer. Although some of these clocks, such as
the one on the AST and Paradise multifunction
cards, come from well known manufacturers, the
clock-only type are typically quite inexpensive,
with mail order prices ranging from $7.50 to $15,
and very often neither the card nor the box it
came in even has a manufacturer's name on it.
For example, the box mine came in says only, "Add-
On Card for '88 or '286 Personal Computer" and
"Made in China." The word "clock" doesn't appear
anywhere on the box and there is not a shred of
documentation. The label on the diskette has only
the handwritten letters, "CK," which presumably is
an abbreviation for "CLOCK." That's the type of
clock CKDRIVE is designed for, and what is meant
here by "add-on clock." Despite its generic
nature, this cheap real-time clock is quite
accurate (as computer clocks go) and can track
time to the millisecond (DOS can only display or
set time to 1/100 second).
Interestingly, the cheap no-name generic imports
and the brand-name clock boards use the same type
of clock chip and usually the same set of I/O
ports. The base port is typically 240 hex, 2C0
hex, or 340 hex (occasionally 3C0 hex) and most of
the boards allow you to select from a pair of
these port addresses (usually 240 hex and 340 hex)
by moving a jumper. When CKDRIVE is loaded, it
checks to see which port addresses your add-on
clock is using and configures itself accordingly
2
for memory-resident operation. If it finds no
add-on clock at any of the four likely base ports,
it reports that and quits.
Some of the better known brands of add-on clocks,
such as the one on the AST Six-Pack, come with
their own memory-resident driver software. AST's
driver is called ASTCLOCK, which goes memory-
resident when you run it with /R on the command
line. If your add-on clock came with that kind of
software, you won't need CKDRIVE, although you
could probably substitute CKDRIVE for the original
driver software. If yours didn't come with that
kind of software, then CKDRIVE is for you.
RUNNING THE PROGRAM:
Type CKDRIVE at the DOS prompt, preferably
immediately after boot-up. The first thing
CKDRIVE does when it's loaded is reset the DOS
clock/calendar from the add-on clock. Thereafter,
your DOS clock/calendar and your add-on clock will
behave as a single clock, passing time and date to
each other as needed. It's advisable to put
CKDRIVE in your AUTOEXEC.BAT file so it can reset
the DOS clock/calendar from the battery clock
whenever you boot the system. Obviously it should
go ahead of any program in the AUTOEXEC sequence
that needs to check the DOS time and date.
When loaded memory-resident, CKDRIVE takes less than
7k of RAM.
AUTOMATIC YEAR ADVANCE AND LEAP YEAR ADJUSTMENT:
Version 2.0 of CKDRIVE will automatically advance
the year in both the add-on clock and the DOS
clock/calendar the first time you request the date
in January -- provided you requested the date at
least once with CKDRIVE installed during the
previous month. After midnight February 28 in a
leap year it will automatically set the date to
February 29 in both clocks -- provided you
requested the date at least once with CKDRIVE
installed between January 1 and February 28.
(Requesting the date during those preliminary
periods is practically unavoidable; you
automatically request the date every time you save
a file to disk, for example.)
3
SYNCHRONIZATION ACCURACY:
When you set or read the time and date from DOS
with CKDRIVE 2.0 loaded, the two clocks should
agree within about .01 second, according to tests
on my 8086 computer. However, agreement between
the two clocks thereafter will depend on two
factors: (1) the relative drift rates of the two
clocks and (2) the frequency of setting or reading
the time. Remember that all computer clocks
drift, including DOS clock/calendars, battery-
operated add-ons, and CMOS clocks. So, if the
add-on clock drifts a few seconds a day, its
deviation from the true time will be passed to the
DOS clock/calendar whenever you ask for the time;
the two clocks will then agree, but both will
deviate from true time to the extent that the add-
on clock does.
KNOWN INCOMPATIBILITIES:
If CKDRIVE is loaded, you should NEVER use the
original software that came with your add-on clock
for reading and setting it. If you do, the hours,
minutes, seconds, fractions of seconds, month, and
day of the month will probably be OK, but the year
will probably be read or set wrong, from CKDRIVE's
perspective. The reason is that the three ports
available for year information in these clocks are
for passive storage and are not controlled by the clock
chip, allowing each software developer to devise his
own method of storing and retrieving that information.
Every program, including CKDRIVE, stores and reads
information about years differently, so you should
always read these clocks with the same software or
software brand you used to set them. Besides, you
won't need any of that software if you use
4
CKDRIVE; its purpose is to make those separate
programs unnecessary.
Use only one clock driver at a time. If you
already have a driver that does what CKDRIVE does,
there is no need to load CKDRIVE too. There will
be trouble if you do; competition between the two
drivers can slow things down dramatically.
The Microsoft BASIC Professional Development
System (version 7.0 of QuickBASIC) is incompatible
with CKDRIVE. This is disappointing but not
surprising since Microsoft recommends that no
memory-resident programs at all be present when
running that version of QuickBASIC. No system
crash results when QuickBASIC 7 is loaded after
CKDRIVE and the two clocks will continue to run,
but each will be oblivious to the other
thereafter. QuickBASIC 7 messes things up so the
two clocks can no longer communicate with each
other through CKDRIVE, and you'll have to reboot
and reload CKDRIVE to get that interaction again.
Finally, conflicts between memory-resident
programs are a fact of life, and they may require
you to modify the sequence in which such programs
are loaded.
PROGRAM HISTORY:
CKDRIVE.COM was inspired by CLKDRV10.SYS, a driver
for slot-type add-on clocks that is loaded as a
device in the CONFIG.SYS file and was written by
my friend Tom Strickland of Alexandria, Virginia.
Tom's driver is part of my TIMESET 5.3 package
(TSET53.EXE in Library 1 of Compuserve's IBMSYS
forum, Library 2 in the MSOPSYS forum, or
TIMSET53.ZIP, .ARC, etc. on bulletin boards around
the country).
Tom programs in assembly and C. I program in
BASIC and wanted to see if I too could write a
driver for these clocks using Microsoft's BASIC
Professional Development System (BASIC 7.0) and
linkable assembly routines from MicroHelp, Inc.
and Crescent Software, as well as some special
purpose assembly routines that I wrote. Crescent
Software's P.D.Q. replacement library for
QuickBASIC is mainly responsible for the program's
small size (for a BASIC program) and its being a
TSR.
5
How do the two drivers compare? Surprisingly
well. With my 8086 computer, the DOS clock and
the add-on clock usually agree within 0.01 sec,
making version 2.0 of CKDRIVE.COM precise enough
to be used with TIMESET.
DISTRIBUTION AND DISCLAIMER:
You can distribute CKDRIVE.COM to anyone you want
provided you do not charge money for it (that's my
department) and do not separate it from this document.
Use of the program is at your own risk. Pete Petrakis
does not claim that the program will work for everybody
and he accepts no responsibility or liability for
anything that might go wrong.
PLEASE DON'T FORGET TO REGISTER
Pete Petrakis
Everett, Washington
November 2, 1990
CIS 76555,1175
6